package com.shameit.goodqrinfomanager.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.shameit.goodqrinfomanager.bean.enity.QueryListBean;
import com.shameit.goodqrinfomanager.databinding.ItemQueryListBinding;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class QueryAdapter extends BaseQuickAdapter<QueryListBean, BaseDataBindingHolder<ItemQueryListBinding>> {

    public QueryAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemQueryListBinding> itemQueryListBindingBaseDataBindingHolder, QueryListBean queryListBean) {
        ItemQueryListBinding binding = itemQueryListBindingBaseDataBindingHolder.getDataBinding();
        if (binding != null) {
            binding.setData(queryListBean);
        }
    }
}
